﻿
namespace NetROS.Tiers.Windows.Forms
{
	/// <summary>
	/// abstract ArtiklSpecifikacija typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class ArtiklSpecifikacijaDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<ArtiklSpecifikacijaDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.ArtiklSpecifikacija _currentArtiklSpecifikacija = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxArtiklSpecifikacijaDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxArtiklSpecifikacijaErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxArtiklSpecifikacijaBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the ID property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Naziv property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxNazivDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDTip property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDTipDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDKategorija property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDKategorijaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the RedBrRacunu property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxRedBrRacunuDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the FormatPrikaza property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxFormatPrikazaDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.ArtiklKategorija> _IDKategorijaList;
		
		/// <summary> 
		/// The list of selectable ArtiklKategorija
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.ArtiklKategorija> IDKategorijaList
		{
			get {return this._IDKategorijaList;}
			set 
			{
				this._IDKategorijaList = value;
				this.uxIDKategorijaDataGridViewColumn.DataSource = null;
				this.uxIDKategorijaDataGridViewColumn.DataSource = this._IDKategorijaList;
			}
		}
		
		private bool _allowNewItemInIDKategorijaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of ArtiklKategorija
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDKategorijaList
		{
			get { return _allowNewItemInIDKategorijaList;}
			set
			{
				this._allowNewItemInIDKategorijaList = value;
				this.uxIDKategorijaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.ArtiklSpecifikacijaTip> _IDTipList;
		
		/// <summary> 
		/// The list of selectable ArtiklSpecifikacijaTip
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.ArtiklSpecifikacijaTip> IDTipList
		{
			get {return this._IDTipList;}
			set 
			{
				this._IDTipList = value;
				this.uxIDTipDataGridViewColumn.DataSource = null;
				this.uxIDTipDataGridViewColumn.DataSource = this._IDTipList;
			}
		}
		
		private bool _allowNewItemInIDTipList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of ArtiklSpecifikacijaTip
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDTipList
		{
			get { return _allowNewItemInIDTipList;}
			set
			{
				this._allowNewItemInIDTipList = value;
				this.uxIDTipDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.ArtiklSpecifikacija> _ArtiklSpecifikacijaList;
				
		/// <summary> 
		/// The list of ArtiklSpecifikacija to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.ArtiklSpecifikacija> ArtiklSpecifikacijaList
		{
			get {return this._ArtiklSpecifikacijaList;}
			set
			{
				this._ArtiklSpecifikacijaList = value;
				this.uxArtiklSpecifikacijaBindingSource.DataSource = null;
				this.uxArtiklSpecifikacijaBindingSource.DataSource = value;
				this.uxArtiklSpecifikacijaDataGridView.DataSource = null;
				this.uxArtiklSpecifikacijaDataGridView.DataSource = this.uxArtiklSpecifikacijaBindingSource;				
				//this.uxArtiklSpecifikacijaBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxArtiklSpecifikacijaBindingSource_ListChanged);
				this.uxArtiklSpecifikacijaBindingSource.CurrentItemChanged += new System.EventHandler(OnArtiklSpecifikacijaBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnArtiklSpecifikacijaBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentArtiklSpecifikacija = uxArtiklSpecifikacijaBindingSource.Current as Entities.ArtiklSpecifikacija;
			
			if (_currentArtiklSpecifikacija != null)
			{
				_currentArtiklSpecifikacija.Validate();
			}
			//_ArtiklSpecifikacija.Validate();
			OnCurrentEntityChanged();
		}

		//void uxArtiklSpecifikacijaBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.ArtiklSpecifikacija"/> instance.
		/// </summary>
		public Entities.ArtiklSpecifikacija SelectedArtiklSpecifikacija
		{
			get {return this._currentArtiklSpecifikacija;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxArtiklSpecifikacijaDataGridView.VirtualMode;}
			set
			{
				this.uxArtiklSpecifikacijaDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxArtiklSpecifikacijaDataGridView.AllowUserToAddRows;}
			set {this.uxArtiklSpecifikacijaDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxArtiklSpecifikacijaDataGridView.AllowUserToDeleteRows;}
			set {this.uxArtiklSpecifikacijaDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxArtiklSpecifikacijaDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxArtiklSpecifikacijaDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="ArtiklSpecifikacijaDataGridViewBase"/> class.
		/// </summary>
		public ArtiklSpecifikacijaDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxArtiklSpecifikacijaDataGridView = new System.Windows.Forms.DataGridView();
			this.uxArtiklSpecifikacijaBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxArtiklSpecifikacijaErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxNazivDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDTipDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxIDKategorijaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxRedBrRacunuDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxFormatPrikazaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			//this.uxIDKategorijaBindingSource = new ArtiklKategorijaBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDKategorijaBindingSource)).BeginInit();
			//this.uxIDTipBindingSource = new ArtiklSpecifikacijaTipBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDTipBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxArtiklSpecifikacijaDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxArtiklSpecifikacijaBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxArtiklSpecifikacijaErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxArtiklSpecifikacijaErrorProvider
			// 
			this.uxArtiklSpecifikacijaErrorProvider.ContainerControl = this;
			this.uxArtiklSpecifikacijaErrorProvider.DataSource = this.uxArtiklSpecifikacijaBindingSource;						
			// 
			// uxArtiklSpecifikacijaDataGridView
			// 
			this.uxArtiklSpecifikacijaDataGridView.AutoGenerateColumns = false;
			this.uxArtiklSpecifikacijaDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxArtiklSpecifikacijaDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDDataGridViewColumn,
		this.uxNazivDataGridViewColumn,
		this.uxIDTipDataGridViewColumn,
		this.uxIDKategorijaDataGridViewColumn,
		this.uxRedBrRacunuDataGridViewColumn,
		this.uxFormatPrikazaDataGridViewColumn			});
			this.uxArtiklSpecifikacijaDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxArtiklSpecifikacijaDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxArtiklSpecifikacijaDataGridView.Name = "uxArtiklSpecifikacijaDataGridView";
			this.uxArtiklSpecifikacijaDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxArtiklSpecifikacijaDataGridView.TabIndex = 0;	
			this.uxArtiklSpecifikacijaDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxArtiklSpecifikacijaDataGridView.EnableHeadersVisualStyles = false;
			this.uxArtiklSpecifikacijaDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnArtiklSpecifikacijaDataGridViewDataError);
			this.uxArtiklSpecifikacijaDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnArtiklSpecifikacijaDataGridViewCellValueNeeded);
			this.uxArtiklSpecifikacijaDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnArtiklSpecifikacijaDataGridViewCellValuePushed);
			
			//
			// uxIDDataGridViewColumn
			//
			this.uxIDDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDataGridViewColumn.DataPropertyName = "ID";
			this.uxIDDataGridViewColumn.HeaderText = "ID";
			this.uxIDDataGridViewColumn.Name = "uxIDDataGridViewColumn";
			this.uxIDDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDataGridViewColumn.ReadOnly = true;		
			//
			// uxNazivDataGridViewColumn
			//
			this.uxNazivDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxNazivDataGridViewColumn.DataPropertyName = "Naziv";
			this.uxNazivDataGridViewColumn.HeaderText = "Naziv";
			this.uxNazivDataGridViewColumn.Name = "uxNazivDataGridViewColumn";
			this.uxNazivDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxNazivDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxNazivDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDTipDataGridViewColumn
			//
			this.uxIDTipDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDTipDataGridViewColumn.DataPropertyName = "IDTip";
			this.uxIDTipDataGridViewColumn.HeaderText = "IDTip";
			this.uxIDTipDataGridViewColumn.Name = "uxIDTipDataGridViewColumn";
			this.uxIDTipDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDTipDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDTipDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDKategorijaDataGridViewColumn
			//
			this.uxIDKategorijaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDKategorijaDataGridViewColumn.DataPropertyName = "IDKategorija";
			this.uxIDKategorijaDataGridViewColumn.HeaderText = "IDKategorija";
			this.uxIDKategorijaDataGridViewColumn.Name = "uxIDKategorijaDataGridViewColumn";
			this.uxIDKategorijaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDKategorijaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDKategorijaDataGridViewColumn.ReadOnly = false;		
			//
			// uxRedBrRacunuDataGridViewColumn
			//
			this.uxRedBrRacunuDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxRedBrRacunuDataGridViewColumn.DataPropertyName = "RedBrRacunu";
			this.uxRedBrRacunuDataGridViewColumn.HeaderText = "RedBrRacunu";
			this.uxRedBrRacunuDataGridViewColumn.Name = "uxRedBrRacunuDataGridViewColumn";
			this.uxRedBrRacunuDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxRedBrRacunuDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxRedBrRacunuDataGridViewColumn.ReadOnly = false;		
			//
			// uxFormatPrikazaDataGridViewColumn
			//
			this.uxFormatPrikazaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxFormatPrikazaDataGridViewColumn.DataPropertyName = "FormatPrikaza";
			this.uxFormatPrikazaDataGridViewColumn.HeaderText = "FormatPrikaza";
			this.uxFormatPrikazaDataGridViewColumn.Name = "uxFormatPrikazaDataGridViewColumn";
			this.uxFormatPrikazaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxFormatPrikazaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxFormatPrikazaDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDKategorijaDataGridViewColumn
			//				
			this.uxIDKategorijaDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDKategorijaDataGridViewColumn.ValueMember = "ID";	
			this.uxIDKategorijaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDKategorijaDataGridViewColumn.DataSource = uxIDKategorijaBindingSource;				
				
			//
			// uxIDTipDataGridViewColumn
			//				
			this.uxIDTipDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDTipDataGridViewColumn.ValueMember = "ID";	
			this.uxIDTipDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDTipDataGridViewColumn.DataSource = uxIDTipBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxArtiklSpecifikacijaDataGridView);
			this.Name = "ArtiklSpecifikacijaDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDKategorijaBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDTipBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxArtiklSpecifikacijaErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxArtiklSpecifikacijaDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxArtiklSpecifikacijaBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				ArtiklSpecifikacijaDataGridViewEventArgs args = new ArtiklSpecifikacijaDataGridViewEventArgs();
				args.ArtiklSpecifikacija = _currentArtiklSpecifikacija;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class ArtiklSpecifikacijaDataGridViewEventArgs : System.EventArgs
		{
			private Entities.ArtiklSpecifikacija	_ArtiklSpecifikacija;
	
			/// <summary>
			/// the  Entities.ArtiklSpecifikacija instance.
			/// </summary>
			public Entities.ArtiklSpecifikacija ArtiklSpecifikacija
			{
				get { return _ArtiklSpecifikacija; }
				set { _ArtiklSpecifikacija = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxArtiklSpecifikacijaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnArtiklSpecifikacijaDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxArtiklSpecifikacijaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnArtiklSpecifikacijaDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxArtiklSpecifikacijaDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						e.Value = ArtiklSpecifikacijaList[e.RowIndex].ID;
						break;
					case "uxNazivDataGridViewColumn":
						e.Value = ArtiklSpecifikacijaList[e.RowIndex].Naziv;
						break;
					case "uxIDTipDataGridViewColumn":
						e.Value = ArtiklSpecifikacijaList[e.RowIndex].IDTip;
						break;
					case "uxIDKategorijaDataGridViewColumn":
						e.Value = ArtiklSpecifikacijaList[e.RowIndex].IDKategorija;
						break;
					case "uxRedBrRacunuDataGridViewColumn":
						e.Value = ArtiklSpecifikacijaList[e.RowIndex].RedBrRacunu;
						break;
					case "uxFormatPrikazaDataGridViewColumn":
						e.Value = ArtiklSpecifikacijaList[e.RowIndex].FormatPrikaza;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxArtiklSpecifikacijaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnArtiklSpecifikacijaDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxArtiklSpecifikacijaDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						ArtiklSpecifikacijaList[e.RowIndex].ID = (System.Int32)e.Value;
						break;
					case "uxNazivDataGridViewColumn":
						ArtiklSpecifikacijaList[e.RowIndex].Naziv = (System.String)e.Value;
						break;
					case "uxIDTipDataGridViewColumn":
						ArtiklSpecifikacijaList[e.RowIndex].IDTip = (System.Int32)e.Value;
						break;
					case "uxIDKategorijaDataGridViewColumn":
						ArtiklSpecifikacijaList[e.RowIndex].IDKategorija = (System.Int32)e.Value;
						break;
					case "uxRedBrRacunuDataGridViewColumn":
						ArtiklSpecifikacijaList[e.RowIndex].RedBrRacunu = (System.Int32?)e.Value;
						break;
					case "uxFormatPrikazaDataGridViewColumn":
						ArtiklSpecifikacijaList[e.RowIndex].FormatPrikaza = (System.String)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
